<?php
    @include_once("conn.php");

    // 1. 根据学员的姓名  进行模糊搜索 

    $id = $_GET["id"];

    $search = "select *,chinese+math+english as total  from `grade` where id = '$id'";

    $result = mysqli_query($conn,$search);

    // print_r($result);  // 结果对象(object)   php对象取值  对象->属性名
    // echo $result->num_rows;

    $item = mysqli_fetch_assoc($result);

    echo json_encode($item);



?>